package com.leetcode.merci.lc575;

/**
 * Created by bowen on 2017/7/24.
 */
public class Solution {
    public int distributeCandies(int[] candies) {
        int[] t=new int[200001];
        int num=0;
        for(int i=0;i<candies.length;i++){
            if(t[candies[i]+100000]==0){
                num++;
                t[candies[i]+100000]++;
            }
        }
        if(num<candies.length/2)
            return num;
        else return candies.length/2;
    }
}